<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path
			+ "/";
%>
<%@ include file="userinfo.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/transitional.dtd">
<html>
	<head>
		<base href="<%=basePath%>">
		<title>部门调查（省市县三级政务部门）</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link rel="stylesheet" type="text/css" href="css/main.css">
		<link rel="stylesheet" type="text/css" href="css/survey.css">
		<script type="text/javascript" src="js/lib/jquery-1.9.1.min.js"></script>
		<script type="text/javascript" src="js/department_survey.js"></script>
		<script type="text/javascript">
			$(function(){
				
				var obj = window.dialogArguments;
				if(obj=='aa'){
					$('#button2,.submit,#next').css('display','none');
					$('input,select,button').attr('disabled','disabled');
					$('#dw').css('margin-bottom','8%');
				}
				$('#print').on('click',function(){
					 var bdhtml=window.document.body.innerHTML;//获取当前页的html代码  
					 var sprnstr="<!--startprint"+oper+"-->";//设置打印开始区域  
					 var eprnstr="<!--endprint"+oper+"-->";//设置打印结束区域  
					 prnhtml=bdhtml.substring(bdhtml.indexOf(sprnstr)+18); //从开始代码向后取html  
					  
					 prnhtmlprnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));//从结束代码向前取html  
					 window.document.body.innerHTML=prnhtml;  
					 window.print();  
					 window.document.body.innerHTML=bdhtml; 
				});
				$('#next').on('click',function(){
					window.open('/gx_survey/com.future.servlet/NextAreaServlet?code='+${userBo.user.username}+'&flag=aa');
				});
				
			});
		</script>
	</head>
	<body>
		<!--start print1--> 
		<div class="title-container">
			<div class="title">
				部门调查（省市县三级政务部门）
			</div>
		</div><!--end print1--> 
		<div class="container">
			<div class="blank-container">
				<div class="blank-fill">
					一、本部门从事电子政务工作的人员
					<input class="blank-answer" onkeyup="value=value.replace(/[^\d]/g,'')" id="item0101" name="item0101" value="${departmentSurveyBo.secondFillBlankModel.item0101}">
					人，其中专职
					<input class="blank-answer" onkeyup="value=value.replace(/[^\d]/g,'')" id="item0102" name="item0102" value=${departmentSurveyBo.secondFillBlankModel.item0102}>
					人。
				</div>
				<div class="blank-fill">
					二、本部门
					<select id="item0201" name="item0201" style="border-style: none;font-size: 20px;width: auto;text-align: justify;">
						<option value="-1" selected="selected" >请选择</option>
						<option value="1"  ${departmentSurveyBo.secondFillBlankModel.item0201==1?"selected='selected'":""}>是</option>
						<option value="0"  ${departmentSurveyBo.secondFillBlankModel.item0201==0?"selected='selected'":""}>否</option>
					</select>
					有计算机机房，
					<input class="blank-answer" onkeyup="value=value.replace(/[^\d\.]/g,'')" id="item0202" name="item0202" value="${departmentSurveyBo.secondFillBlankModel.item0202}">
					平方米，
					<input class="blank-answer" onkeyup="value=value.replace(/[^\d\.]/g,'')" id="item0203" name="item0203" value="${departmentSurveyBo.secondFillBlankModel.item0203}">
					台服务器，存储容量
					<input class="blank-answer" onkeyup="value=value.replace(/[^\d\.]/g,'')" id="item0204" name="item0204" value="${departmentSurveyBo.secondFillBlankModel.item0204}">
					TB ，网络带宽
					<input class="blank-answer" onkeyup="value=value.replace(/[^\d\.]/g,'')" id="item0205" name="item0205" value="${departmentSurveyBo.secondFillBlankModel.item0205}">
					MB/s ，互联网出口带宽
					<input class="blank-answer" onkeyup="value=value.replace(/[^\d\.]/g,'')" id="item0206" name="item0203" value="${departmentSurveyBo.secondFillBlankModel.item0206}">
					MB/s 。
				</div>
				<div class="blank-fill">
					三、本部门信息化硬软件资产总额
					<input class="blank-answer" onkeyup="value=value.replace(/[^\d\.]/g,'')" id="item0301" name="item0301" value="${departmentSurveyBo.secondFillBlankModel.item0301}">
					万元，年度系统运维资金为
					<input class="blank-answer" onkeyup="value=value.replace(/[^\d\.]/g,'')" id="item0302" name="item0302" value="${departmentSurveyBo.secondFillBlankModel.item0302}">
					万元。
				</div>
				<div class="blank-fill">
					四、本部门有
					<input class="blank-answer" onkeyup="value=value.replace(/[^\d]/g,'')" id="item0401" name="item0401" value="${departmentSurveyBo.secondFillBlankModel.item0401}">
					个处室（科室），
					<input class="blank-answer" onkeyup="value=value.replace(/[^\d]/g,'')" id="item0402" name="item0402" value="${departmentSurveyBo.secondFillBlankModel.item0402}">
					个处室的业务工作实现信息化支撑。请将处室名称和主要业务填表如下：
				</div>
				<div class="blank-fill blank-info" >
					(注：“信息化支撑”栏,有信息化支撑的打 “√”，没有信息化支撑的打“×”;)
				</div>
			</div>
			<div class="grid-container">
				<table id="officeServiceTable" class="grid">
					<tr>
						<th>
							序号
						</th>
						<th>
							处室名称
						</th>
						<th>
							主要业务
						</th>
						<th>
							信息化支撑
						</th>
						<th>
							操作
						</th>
					</tr>
					<c:if test="${!empty departmentSurveyBo.officesBoList}">
						<c:forEach var="officeBo" items="${departmentSurveyBo.officesBoList}">
							<c:set var="listSize" value="${fn:length(officeBo.offceServiceModelList)}"></c:set>
							<c:set var="count" value="0"></c:set>
							<c:forEach var="officeService" items="${officeBo.offceServiceModelList}">
								<c:choose>
									<c:when test="${count == 0}">
										<tr>
											<td class='officeService-id'>
											</td>
											<td class="office-name" rowspan="${listSize}">
												<input type="text" class="second-blank-answer" name="officeName" value="${officeBo.officeName}">
												<input type="hidden" class="second-blank-answer" name="officeid" value="${officeBo.officeId}">
											</td>
											<td class="officeService-services">
												<input type="text" class="second-blank-answer" name="services" value="${officeService.services}">
												<input type='hidden' class='second-blank-answer' name='officeServiceid' value="${officeService.id}">
											</td>
											<td class="officeService-issupport">
												<select id="issupport" name="issupport" >
													<option value="-1" selected="selected"></option>
													<option value="1"  ${officeService.issupport==1?"selected='selected'":""}>√</option>
													<option value="0"  ${officeService.issupport==0?"selected='selected'":""}>×</option>
												</select>
											</td>
											<td class="officeService-op">
												<button class="addOfficeServices">
													添加
												</button>
												<button class="delAllOfficeServices">
													删除
												</button>
											</td>
										</tr>
									</c:when>
									<c:when test="${count > 0}">
										<c:set var="superCount" value="${superCount+1}"></c:set>
										<tr>
											<td class='officeService-id'>
											</td>
											<td class="officeService-services">
												<input type="text" class="second-blank-answer" name="services" value="${officeService.services}">
												<input type='hidden' class='second-blank-answer' name='officeServiceid' value="${officeService.id}">
											</td>
											<td class="officeService-issupport">
												<select id="issupport" name="issupport" >
													<option value="-1" selected="selected"></option>
													<option value="1"  ${officeService.issupport==1?"selected='selected'":""}>√</option>
													<option value="0"  ${officeService.issupport==0?"selected='selected'":""}>×</option>
												</select>
											</td>
											<td class="officeService-op">
												<button class="addOfficeServices">
													添加
												</button>
												<button class="delOfficeServices">
													删除
												</button>
											</td>
										</tr>
									</c:when>
								</c:choose>
									<c:set var="count" value="${count + 1}"></c:set>
							</c:forEach>
						</c:forEach>
					</c:if>
				</table>
				<div style="width: 95%; margin: 10 auto;">
					<button style="width: 100px;" id="addOffice">
						添加部门
					</button>
				</div>
			</div>
			<div class="blank-container">
				<div class="blank-fill">
					五、请您在下列表格当中选择本部门已经获得的信息内容
				</div>
				<div class="blank-fill blank-info">
					(注：1.“共享”栏，已经共享的打 “√”，为共享的打“×”；2.“共享方式”栏中填写相应的序号（A.信息共享平台 B.政务网站（互联网） C.移动介质（光盘等））
				</div>
			</div>
			<div class="grid-container">
				<table class="grid">
					<tr>
						<th>
							序号
						</th>
						<th>
							部门
						</th>
						<th>
							信息内容
						</th>
						<th>
							共享
						</th>
						<th>
							共享方式
						</th>
					</tr>
					<!-- 下面循环显示 -->
					<c:set var="superCount" value="0"></c:set>
					<c:forEach var="departmentShareInfor" items="${departmentSurveyBo.departmentShareInfoList}">
						<c:set var="listSize" value="${fn:length(departmentShareInfor.departmentShareInforList)}"></c:set>
						<c:set var="count" value="0"></c:set>
						<c:forEach var="information" items="${departmentShareInfor.departmentShareInforList}">
							<c:choose>
								<c:when test="${count == 0}">
									<c:set var="superCount" value="${superCount+1}"></c:set>
									<tr>
										<td class="grid-id">
											${superCount}
											<input type="hidden" name="informationId" value="${information.informationId }">
										</td>
										<td class="grid-department" rowspan="${listSize}">
											${departmentShareInfor.departmentName}
										</td>
										<td class="grid-content">
											${information.information}
										</td>
										<td class="grid-answer">
											<select id="isShare" name="isShare" class="isShare${superCount}">
												<option value="-1" selected="selected"></option>
												<option value="1"  ${information.isShare==1?"selected='selected'":""}>√</option>
												<option value="0"  ${information.isShare==0?"selected='selected'":""}>×</option>
											</select>
										</td>
										<td class="grid-answer">
										<div name = "shareType" class = "shareType shareType${superCount}" style =${information.isShare==1?"display:inline;":"display:none;"}>
											<span><input type = "checkbox" value = "A" ${fn:contains(information.shareType,"A")?"checked='checked'":""}>信息共享平台</span>
											<span><input type = "checkbox" value = "B" ${fn:contains(information.shareType,"B")?"checked='checked'":""}>政府网站(互联网)</span>
											<span><input type = "checkbox" value = "C" ${fn:contains(information.shareType,"C")?"checked='checked'":""}>移动介质(光盘等)</span>
										</div>
											<!-- 
											<select id="shareType" name="shareType" multiple="multiple" class="shareType${superCount}" style=${information.isShare==1?"display:block;":"display:none;"}>
												<option value="A"  ${fn:contains(information.shareType,"A")?"selected='selected'":""}>信息共享平台</option>
												<option value="B"  ${fn:contains(information.shareType,"B")?"selected='selected'":""}>政府网站(互联网)</option>
												<option value="C"  ${fn:contains(information.shareType,"C")?"selected='selected'":""}>移动介质(光盘等)</option>
											</select>
											 -->
										</td>
									</tr>
								</c:when>
								<c:when test="${count > 0}">
									<c:set var="superCount" value="${superCount+1}"></c:set>
									<tr>
										<td class="grid-id">
											${superCount}
											<input type="hidden" name="informationId" value="${information.informationId }">
										</td>
										<td class="grid-content">
											${information.information}    
										</td>
										<td class="grid-answer">
											<select id="isShare" name="isShare" class="isShare${superCount}">
												<option value="-1" selected="selected"></option>
												<option value="1"  ${information.isShare==1?"selected='selected'":""}>√</option>
												<option value="0"  ${information.isShare==0?"selected='selected'":""}>×</option>
											</select>
										</td>
										<td class="grid-answer">
										<div  name = "shareType" class = "shareType shareType${superCount}" style =${information.isShare==1?"display:inline;":"display:none;"}>
											<span><input type = "checkbox" value = "A" ${fn:contains(information.shareType,"A")?"checked='checked'":""}>信息共享平台</span>
											<span><input type = "checkbox" value = "B" ${fn:contains(information.shareType,"B")?"checked='checked'":""}>政府网站(互联网)</span>
											<span><input type = "checkbox" value = "C" ${fn:contains(information.shareType,"C")?"checked='checked'":""}>移动介质(光盘等)</span>
										</div>
											<!-- 
											<select id="shareType" name="shareType" multiple="multiple" class="shareType${superCount}" style=${information.isShare==1?"display:block;":"display:none;"}>
												<option value="A"  >信息共享平台</option>
												<option value="B"  >政府网站(互联网)</option>
												<option value="C"  >移动介质(光盘等)</option>
											</select>
											 -->
										</td>
									</tr>
								</c:when>
							</c:choose>
							<c:set var="count" value="${count+1}"></c:set>
						</c:forEach>
					</c:forEach>
				</table>
			</div>
			<div class="button-container">
				<input class="submit" type="submit" id="button1" value="保存提交" />
			</div>
		</div>
		<div class="slid-button" id='dw'>
				<img id = "next" src="images/bulb_off_64.png" title="下级"><br>
				<img id = "print" src="images/document_64.png" title="打印"><br>
				<img src="images/arrow_up_64.png" id="uw" onclick="javascript:scroll(0,0);" title="顶部"><br>
				<img src="images/checkmark_64.png" id="button2" title="临时保存"><br>
				<img src="images/arrow_down_64.png" onclick="javascript:scroll(0,80000);" title="底部">
		</div>
	</body>
</html>
